
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpCemOption.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpCemOptionForm"
 */
public class CcpCemOptionForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _ccoGuid = null;
   private java.lang.String _title = null;
   private java.lang.String _subTitle = null;
   private java.lang.String _ytitle = null;
   private java.lang.String _isStartzero = null;
   private java.lang.String _isYshowx = null;
   private java.lang.String _isShowpercent = null;
   private java.lang.String _isShortvalue = null;
   private java.lang.String _isShowvaluelable = null;
   private java.lang.String _bgcolor = null;
   private java.lang.String _legendType = null;
   private Integer _chartHeight = null;
   private Integer _chartWidth = null;
   private java.math.BigDecimal _alpha = null;
   private java.lang.String _defaultSubtype = null;
   private java.lang.String _defaultLayout = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;
   private java.lang.String _reserved4 = null;
   private java.lang.String _reserved5 = null;

   /**
    * Standard constructor.
    */
   public CcpCemOptionForm() {
   }

   /**
    * Returns the ccoGuid
    *
    * @return the ccoGuid
    */
   public java.lang.String getCcoGuid() {
      return _ccoGuid;
   }

   /**
    * Sets the ccoGuid
    *
    * @param ccoGuid the new ccoGuid value
    */
   public void setCcoGuid(java.lang.String ccoGuid) {
      _ccoGuid = ccoGuid;
   }
   /**
    * Returns the title
    *
    * @return the title
    */
   public java.lang.String getTitle() {
      return _title;
   }

   /**
    * Sets the title
    *
    * @param title the new title value
    */
   public void setTitle(java.lang.String title) {
      _title = title;
   }
   /**
    * Returns the subTitle
    *
    * @return the subTitle
    */
   public java.lang.String getSubTitle() {
      return _subTitle;
   }

   /**
    * Sets the subTitle
    *
    * @param subTitle the new subTitle value
    */
   public void setSubTitle(java.lang.String subTitle) {
      _subTitle = subTitle;
   }
   /**
    * Returns the ytitle
    *
    * @return the ytitle
    */
   public java.lang.String getYtitle() {
      return _ytitle;
   }

   /**
    * Sets the ytitle
    *
    * @param ytitle the new ytitle value
    */
   public void setYtitle(java.lang.String ytitle) {
      _ytitle = ytitle;
   }
   /**
    * Returns the isStartzero
    *
    * @return the isStartzero
    */
   public java.lang.String getIsStartzero() {
      return _isStartzero;
   }

   /**
    * Sets the isStartzero
    *
    * @param isStartzero the new isStartzero value
    */
   public void setIsStartzero(java.lang.String isStartzero) {
      _isStartzero = isStartzero;
   }
   /**
    * Returns the isYshowx
    *
    * @return the isYshowx
    */
   public java.lang.String getIsYshowx() {
      return _isYshowx;
   }

   /**
    * Sets the isYshowx
    *
    * @param isYshowx the new isYshowx value
    */
   public void setIsYshowx(java.lang.String isYshowx) {
      _isYshowx = isYshowx;
   }
   /**
    * Returns the isShowpercent
    *
    * @return the isShowpercent
    */
   public java.lang.String getIsShowpercent() {
      return _isShowpercent;
   }

   /**
    * Sets the isShowpercent
    *
    * @param isShowpercent the new isShowpercent value
    */
   public void setIsShowpercent(java.lang.String isShowpercent) {
      _isShowpercent = isShowpercent;
   }
   /**
    * Returns the isShortvalue
    *
    * @return the isShortvalue
    */
   public java.lang.String getIsShortvalue() {
      return _isShortvalue;
   }

   /**
    * Sets the isShortvalue
    *
    * @param isShortvalue the new isShortvalue value
    */
   public void setIsShortvalue(java.lang.String isShortvalue) {
      _isShortvalue = isShortvalue;
   }
   /**
    * Returns the isShowvaluelable
    *
    * @return the isShowvaluelable
    */
   public java.lang.String getIsShowvaluelable() {
      return _isShowvaluelable;
   }

   /**
    * Sets the isShowvaluelable
    *
    * @param isShowvaluelable the new isShowvaluelable value
    */
   public void setIsShowvaluelable(java.lang.String isShowvaluelable) {
      _isShowvaluelable = isShowvaluelable;
   }
   /**
    * Returns the bgcolor
    *
    * @return the bgcolor
    */
   public java.lang.String getBgcolor() {
      return _bgcolor;
   }

   /**
    * Sets the bgcolor
    *
    * @param bgcolor the new bgcolor value
    */
   public void setBgcolor(java.lang.String bgcolor) {
      _bgcolor = bgcolor;
   }
   /**
    * Returns the legendType
    *
    * @return the legendType
    */
   public java.lang.String getLegendType() {
      return _legendType;
   }

   /**
    * Sets the legendType
    *
    * @param legendType the new legendType value
    */
   public void setLegendType(java.lang.String legendType) {
      _legendType = legendType;
   }
   /**
    * Returns the chartHeight
    *
    * @return the chartHeight
    */
   public java.lang.Integer getChartHeight() {
      return _chartHeight;
   }

   /**
    * Sets the chartHeight
    *
    * @param chartHeight the new chartHeight value
    */
   public void setChartHeight(java.lang.Integer chartHeight) {
      _chartHeight = chartHeight;
   }
   /**
    * Returns the chartWidth
    *
    * @return the chartWidth
    */
   public java.lang.Integer getChartWidth() {
      return _chartWidth;
   }

   /**
    * Sets the chartWidth
    *
    * @param chartWidth the new chartWidth value
    */
   public void setChartWidth(java.lang.Integer chartWidth) {
      _chartWidth = chartWidth;
   }
   /**
    * Returns the alpha
    *
    * @return the alpha
    */
   public java.math.BigDecimal getAlpha() {
      return _alpha;
   }

   /**
    * Sets the alpha
    *
    * @param alpha the new alpha value
    */
   public void setAlpha(java.math.BigDecimal alpha) {
      _alpha = alpha;
   }
   /**
    * Returns the defaultSubtype
    *
    * @return the defaultSubtype
    */
   public java.lang.String getDefaultSubtype() {
      return _defaultSubtype;
   }

   /**
    * Sets the defaultSubtype
    *
    * @param defaultSubtype the new defaultSubtype value
    */
   public void setDefaultSubtype(java.lang.String defaultSubtype) {
      _defaultSubtype = defaultSubtype;
   }
   /**
    * Returns the defaultLayout
    *
    * @return the defaultLayout
    */
   public java.lang.String getDefaultLayout() {
      return _defaultLayout;
   }

   /**
    * Sets the defaultLayout
    *
    * @param defaultLayout the new defaultLayout value
    */
   public void setDefaultLayout(java.lang.String defaultLayout) {
      _defaultLayout = defaultLayout;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }
   /**
    * Returns the reserved4
    *
    * @return the reserved4
    */
   public java.lang.String getReserved4() {
      return _reserved4;
   }

   /**
    * Sets the reserved4
    *
    * @param reserved4 the new reserved4 value
    */
   public void setReserved4(java.lang.String reserved4) {
      _reserved4 = reserved4;
   }
   /**
    * Returns the reserved5
    *
    * @return the reserved5
    */
   public java.lang.String getReserved5() {
      return _reserved5;
   }

   /**
    * Sets the reserved5
    *
    * @param reserved5 the new reserved5 value
    */
   public void setReserved5(java.lang.String reserved5) {
      _reserved5 = reserved5;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCcoGuid() == null) {
         errors.add("ccoGuid", new ActionError("error.ccoGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
